package com.me.modules.questionnaire.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.me.modules.questionnaire.dao.QuQuestionDao;
import com.me.modules.questionnaire.entity.QuQuestionEntity;
import com.me.modules.questionnaire.service.QuQuestionService;



@Service("quQuestionService")
public class QuQuestionServiceImpl implements QuQuestionService {
	@Autowired
	private QuQuestionDao quQuestionDao;

	@Override
	public QuQuestionEntity queryObject(Integer id){
		return quQuestionDao.queryObject(id);
	}

	@Override
	public List<QuQuestionEntity> queryList(Map<String, Object> map){
		return quQuestionDao.queryList(map);
	}

    @Override
    public List<QuQuestionEntity> queryListByBean(QuQuestionEntity entity) {
        return quQuestionDao.queryListByBean(entity);
    }

	@Override
	public int queryTotal(Map<String, Object> map){
		return quQuestionDao.queryTotal(map);
	}

	@Override
	public int save(QuQuestionEntity quQuestion){
//		  quQuestion.setId(Utils.uuid());

		return quQuestionDao.save(quQuestion);
	}

	@Override
	public int update(QuQuestionEntity quQuestion){
        return quQuestionDao.update(quQuestion);
	}

	@Override
	public int delete(Integer id){
        return quQuestionDao.delete(id);
	}

	@Override
	public int deleteBatch(Integer[] ids){
        return quQuestionDao.deleteBatch(ids);
	}

	@Override
	public List<QuQuestionEntity> getQuestions(Integer belongId) {
		return quQuestionDao.getQuestions(belongId);
	}

}
